I. Field
The present invention relates generally to the efficient operation of a device, and more particularly, to a system that provides efficient transitioning between non-privileged and privileged operating modes of a device.
II. Description of the Related Art
Advances in technology have resulted in the development of a variety of devices for home, office, and personal use. For example, computer systems, such as desktops, notebooks, and tablet computers have become powerful tools for use at home or in office environments. Personal devices, such as wireless telephones, personal digital assistants (PDAs), and paging devices have also become more powerful and are now widely used.
Many devices now comprise complex hardware and software that run operating systems such as UNIX, LINUX, or similar operating systems. Generally, these operating systems provide for multiple modes of operation. For example, most systems provide privileged and non-privileged modes of operation. Programs executing in the privileged mode of operation are allowed to access memory and system resources without limitation. Programs executing in the non-privileged mode are restricted from accessing certain memory regions and/or device systems. This configuration provides a level of protection to important memory or device functions. For example, by executing third-party applications in the non-privileged mode, important memory regions and device functions can be protected from unauthorized access. Also, such an arrangement allows the system to isolate faults during execution.
However, in some situations, it is desirable to allow an application executing in the non-privileged mode to have access to privileged memory or device functions. For example, it may be desirable to allow an application to have access to a selected system file, or device hardware, such as a device modem. To accomplish this in conventional systems, a trap is utilized to suspend execution of the application while a separate privileged mode “kernel” task performs the requested operation. Unfortunately, providing a new privileged mode task results in additional scheduling complexity and overhead. There may also be additional system delays in the form of dispatcher latency. Furthermore, the new task may execute at a different priority than the non-privileged application from which it was invoked, thereby further complicating system scheduling and operation.
Therefore, what is needed is a system that provides a way for an application to transition between non-privileged and privileged operating modes in a device, where the transition does not require a new task to be created, thereby reducing scheduling complexity and avoiding potential dispatcher latency.